package typeinfo;

import typeinfo.interfacea.*;

import static net.mindview.util.Print.*;

class AnonymousA {
    public static A makeA() {
        return new A() {
            public void f() {
                print("public C.f()");
            }

            public void g() {
                print("public C.g()");
            }

            void u() {
                print("package C.u()");
            }

            protected void v() {
                print("protected C.v()");
            }

            private void w() {
                print("private C.w()");
            }
        };
    }
}

public class AnonymousImplementation {
    public static void main(String[] args) throws Exception {
        A a = AnonymousA.makeA();
        a.f();
        HiddenImplementation.callHiddentMethod(a, "g");
        HiddenImplementation.callHiddentMethod(a,"u");
        HiddenImplementation.callHiddentMethod(a,"v");
        HiddenImplementation.callHiddentMethod(a,"w");
    }
}
